import Vue from 'vue'
import VueRouter from 'vue-router'
import has from '../views/has.vue'
import Home from '../views/Home.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'has',
    component: has,
    redirect:'Home',
    children:[
      {
        path: 'Home',
        name: 'Home',
        component: Home
      },
      {
        path: '/find',
        name: 'find',
        component: () => import('../views/find.vue')
      },
      {
        path: '/oder',
        name: 'oder',
        component: () => import('../views/oder.vue')
      },
      {
        path: '/my',
        name: 'my',
        component: () => import('../views/my.vue')
      },
    ]
  },
 
  {
    path: '/search',
    name: 'search',
    component: () => import('../views/search.vue')
  }
]

const router = new VueRouter({
  routes
})

export default router
